package cn.com.api.service.impl.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.U_article_cate;

import cn.com.api.mapper.U_article_cateMapper;

import cn.com.api.service.U_article_cateService;

/**
 * 
 **/
@Service
public class U_article_cateServiceImplBase {
	@Autowired
	private U_article_cateMapper U_article_cateMapper;
    
    // 根据id获取
	public U_article_cate findU_article_cateById(Integer id){
		U_article_cate u_article_cate = U_article_cateMapper.findU_article_cateById( id );
		return u_article_cate;
	}
    
    //查看数据集
	public List<U_article_cate> findU_article_cates(){
        List<U_article_cate> u_article_cates = U_article_cateMapper.findU_article_cates();
		return u_article_cates;
    }
    
	// 添加
	public int insertU_article_cate(U_article_cate u_article_cate){
		int ret_I= U_article_cateMapper.insertU_article_cate(u_article_cate);
		return ret_I;
	}

	// 修改
	public int updateU_article_cate(U_article_cate u_article_cate){
		int ret_I= U_article_cateMapper.updateU_article_cate(u_article_cate);
		return ret_I;
	}
	
    // 删除
	public int deleteU_article_cate(Integer id){
		int ret_I= U_article_cateMapper.deleteU_article_cate( id );
		return ret_I;
	}
	
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    //获取根据article_id	
    public List<U_article_cate> findU_article_catesByArticle_id(String article_id){
        List<U_article_cate> u_article_cates = U_article_cateMapper.findU_article_catesByArticle_id(article_id);
		return u_article_cates;
    }
    		
    //获取根据cate_id	
    public List<U_article_cate> findU_article_catesByCate_id(String cate_id){
        List<U_article_cate> u_article_cates = U_article_cateMapper.findU_article_catesByCate_id(cate_id);
		return u_article_cates;
    }
    		
 
}


